<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>订单支付</title>
<link rel="stylesheet" type="text/css" href="#{$smarty.const.APP}#/View/template/home/css/hui.css" />
</head>
<body style="background:#F4F5F6;">
<header class="hui-header">
  <div id="hui-back"></div>
  <h1>订单支付</h1>
  <div class="hui-header-sreach-txt" onclick=""></div>
</header>
<div class="hui-wrap">
  <div style="margin:20px 0px; margin-bottom:15px;" class="hui-list">
    <div class="row">
      <div class="hui-col-4">订单编号：</div>
      <div class="hui-col-8">#{$one.order_no}#</div>
    </div>
    <div class="row">
      <div class="hui-col-4">订单金额：</div>
      <div class="hui-col-8">#{$one.goods_money}#</div>
    </div>
    <div class="hui-row">
      <div class="hui-col-4">支付方式：</div>
      <div class="hui-col-8">
          <div class="hui-form-radios">
            <input type="radio" value="1" name="pay_mody" id="g1" checked="checked" />
            <label for="g1">余额支付</label>
            <br />
            <input type="radio" value="2" name="pay_mody" id="g2" />
            <label for="g2">微信支付</label>
			  <br />
			  <input type="radio" value="3" name="pay_mody" id="g3" />
            <label for="g3">支付宝</label>
          </div>
      </div>
    </div>
  </div>
</div>
<div style="padding:10px; padding-top:10px;">
  <button type="button" class="hui-button hui-button-large hui-primary" id="submit">确认支付</button>
</div>
<script type="text/javascript" src="#{$smarty.const.APP}#/View/template/home/js/hui.js" charset="UTF-8"></script> 
<script type="text/javascript" src="#{$smarty.const.APP}#/View/template/home/js/hui-form.js" charset="utf-8"></script> 
<script src="#{$smarty.const.APP}#/View/template/home/plus/jquery1.42.min.js" type="text/javascript" charset="utf-8"></script> 
<script type="text/javascript">
//初始化表单
hui.formInit();
hui('#submit').click(function(){
  	 var order_id = '#{$one.order_id}#';
	 var pay_mode= $("input[name='pay_mody']:checked").val();
		hui.ajax({
			type : 'POST',
			url : '#{$smarty.const.ACT}#/home/WxGoodsBuy/goods_buy_pay/',
			data : {order_id:order_id,pay_mode:pay_mode},
			backType:'json',
			beforeSend : function(){hui.loading();},
			complete : function(){hui.closeLoading();},
			success : function(data){
				if(data.statusCode=='200'){
					hui.upToast(data.message);
					var url='#{$smarty.const.ACT}#/home/WxGoodsOrder/goods_order_my_show/';
					window.location.href=url;
				}else{
					hui.upToast(data.message);
				}
				
			},
			error : function(e){
				console.log(JSON.stringify(e));
				hui.iconToast('读取消息失败', 'warn');
			}
		});
});
</script>
</body>
</html>